#ifndef __PHIDGETROOTOBJECT_H__
#define __PHIDGETROOTOBJECT_H__

#include "MonkeyObject.h"
#include <map>
#include <string>
#include <list>

class Phidget;
class PhidgetManager;
class Message;
class PhidgetValueObject;

class PhidgetRootObject : public MonkeyObject
{
  private:
	PhidgetManager *manager;
	PhidgetValueObject *valueObject;
	static void jscb_event(Message *msg, void *userInfo);
	static JSBool js_onvaluechange(JSContext *cx, uintN argc, jsval *vp);

  protected:
	virtual void RegisterObject(MonkeyContext *ctx, JSObject *parent);
  	
  public:
  	PhidgetRootObject(PhidgetManager *pm, MonkeyRuntime *rt);
  	~PhidgetRootObject();
};

#endif /* __PHIDGETROOTOBJECT_H__ */

